// export const formatTime = (data, flag: boolean) => {
//     const date = new Date(data);
//     const y = date.getFullYear();
//     let m: number | string = date.getMonth() + 1;
//     m = m < 10 ? '0' + m : m;
//     let d: number | string = date.getDate();
//     d = d < 10 ? '0' + d : d;
//     let h: number | string = date.getHours();
//     h = h < 10 ? '0' + h : h;
//     let minute: number | string = date.getMinutes();
//     minute = minute < 10 ? '0' + minute : minute;
//     let second: number | string = date.getSeconds();
//     second = second < 10 ? '0' + second : second;
//     if (flag) {
//       return y + '-' + m + '-' + d;
//     }
//     return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
//   };
  
